package com.blb.goods_service.controller;

import com.blb.goods_service.entity.JsonResult;
import com.blb.goods_service.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/goods_test")
public class GoodsController {

    @Autowired
    private GoodsService goodsService;

    @GetMapping("/buy")
    public JsonResult<Boolean> buy(){
        return new JsonResult<>(1,goodsService.buyGoods());
    }


}
